package com.example.onlinemallsystem.entity;

import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class Product {
    private User user;
    private Category category;
    // 对应表中 id 字段，bigint 类型，通常用 Long 映射
    private Long id;
    // name 字段，varchar(100)，用 String
    private String name;
    // description 字段，text 类型，大文本用 String
    private String description;
    // price 字段，decimal(10,2)，精准小数用 BigDecimal
    private BigDecimal price;
    // original_price 字段，decimal(10,2)
    // stock 字段，int，初始 0
    private Integer stock = 0;
    // sales 字段，int，初始 0
    private Integer sales = 0;
    // status 字段，tinyint，通常用 Integer 或 byte 映射，这里用 Integer
    private Integer status = 1;
    // images 字段，varchar(1024)
    private String images;
    // category_id 字段，bigint
    private Long categoryId;
    private Long sellerId;
    private String categoryName;
    private String sellerName;
    // sort 字段，int，初始 0
    private Integer sort = 0;
    // create_time 字段，
    private Date createTime;
    // update_time 字段，datetime
    private Date updateTime;
    // deleted 字段，tinyint，初始 0
    private Integer deleted = 0;
    private String image;

}
